/*
 * Copyright 2011 Clean GWT
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
/**
 *
 */
package com.cleangwt.user.shared;

//import org.codehaus.jackson.annotate.JsonIgnore;
//import org.codehaus.jackson.map.annotate.JsonSerialize;

/**
 * The option with name, value and disabled.
 * 
 * @author Jess
 * @version 1.0
 * @since 1.0
 */
public class Option {
  private Boolean disabled;

  private String name;

  private String value;

  /**
   * The default constructor.
   */
  public Option() {
  }

  /**
   * Constructs an option with the given name.
   * 
   * @param name the name for name and value
   */
  public Option(String name) {
    this(name, name);
  }

  /**
   * Constructs an option with the given name and value.
   * 
   * @param name the name
   * @param value the value
   */
  public Option(String name, String value) {
    this.name = name;
    this.value = value;
  }

  /**
   * Constructs an option with the given name, value and disabled.
   * 
   * @param name the name
   * @param value the value
   * @param disabled the disabled
   */
  public Option(String name, String value, Boolean disabled) {
    this.name = name;
    this.value = value;
    this.disabled = disabled;
  }

  /**
   * @return the disabled
   */
  //@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
  public Boolean getDisabled() {
    return disabled;
  }

//  /**
//   * @return the disabled
//   */
//  @JsonIgnore
//  public boolean isDisabled() {
//    return disabled == null ? false : disabled;
//  }

  /**
   * @return the name
   */
  public String getName() {
    return name;
  }

  /**
   * @return the value
   */
  public String getValue() {
    return value;
  }

  /**
   * @param disabled the disabled to set
   */
  public void setDisabled(Boolean disabled) {
    this.disabled = disabled;
  }

  /**
   * @param name the name to set
   */
  public void setName(String name) {
    this.name = name;
  }

  /**
   * @param value the value to set
   */
  public void setValue(String value) {
    this.value = value;
  }

}
